﻿#include "station.h"

Station::Station() = default;

Station::Station(int id, Point *point, Station::StationInfo info, double data)
   : id_(id)
   , pose_(point)
   , station_info_(info)
   , data_(data)
{
}


Point *Station::point() const
{
   return pose_;
}


void Station::setPose(Point *point)
{
   pose_ = point;
}


int Station::id() const
{
   return id_;
}


void Station::setId(int id)
{
   id_ = id;
}


Station::StationInfo Station::info() const
{
   return station_info_;
}


void Station::setStationInfo(const StationInfo& info)
{
   station_info_ = info;
}


double Station::data() const
{
   return data_;
}


void Station::setData(double value)
{
   data_ = value;
}


QDebug operator<<(QDebug debug, const Station& s)
{
//   QMetaEnum me = QMetaEnum::fromType<Station::StationInfo>();
//   << " info:" << me.key(s.info())
//   << " data:" << s.data()
   debug.noquote().nospace() << "["
                             << "id:" << QString::number(s.id())
                             << " point:" << *s.point()
                             << "]";
   return debug;
}
